package com.wjc.network.errorhandler

import io.reactivex.rxjava3.core.Observable
import io.reactivex.rxjava3.core.Single
import io.reactivex.rxjava3.functions.Function


/**
 * ClassName: com.wjc.network.errorhandler
 * Description:
 * JcChen on 2021.04.17.15:45
 */
class HttpErrorHandler<T> : Function<Throwable, Single<T>> {
    override fun apply(t: Throwable): Single<T> {
      return Single.error(ExceptionHandle.handleException(t))
    }
}